﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace WpfApplication2
{
    class ketnoi
    {
        public void insertdata(String masv,String tensv,String malop,String diachi)
        {
        SqlConnection conn=new SqlConnection();
        conn.ConnectionString = "Data Source=(local);Initial Catalog=qlsv; User Id=sa; Password=sa";
        conn.Open();
        SqlCommand cmd = new SqlCommand("insert into sinhvien values('" + masv.ToString() + "','" + tensv.ToString() + "','" + malop.ToString() + "','" + diachi.ToString() + "')", conn);
        cmd.ExecuteNonQuery();
        conn.Close();
        }
       
    }
}
